package com.github;


import com.github.sub.conf.ConfPathCommander;

import java.util.HashMap;
import java.util.Map;


public class ConfCommander extends Common implements Commander {

    private static final Map<String, Commander> MAP = new HashMap<>();

    static {
        MAP.put("-path", new ConfPathCommander());
    }

    @Override
    public Object run(Map<String, String> command) {
        command.forEach((k, v) -> {
            Commander commander = MAP.get(k);
            if (commander == null) {
                System.out.println(k + notFound);
            } else {
                commander.run(command);
            }
        });
        return null;
    }


//    public static void main(String[] args) {
//        ConfCommander confCommander = new ConfCommander();
//        confCommander.operation("-path", "E:\\mytest\\test");
//    }


}
